package com.crm.mapper;

import com.crm.pojo.domain.Dept;
import com.crm.pojo.dto.DeptDto;
import com.crm.pojo.vo.DeptVo;
import lombok.Data;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DeptMapper {
    List<DeptVo> list(DeptDto deptDto);
    @Select("select * from dept where dept_id = #{id}")
    DeptVo getById(Long id);

    int add(Dept dept);

    List<DeptVo> children(Long id);

    int deleteById(Long id);

    void update(Dept newDept);
    @Select("select * from dept")
    List<DeptVo> exclude(Long id);
}
